<?php
Globals::requireTable('Log');

class LogModel extends Config
{
	protected $table;
	
	public function __construct($config = null)
	{
		parent::__construct($config);
		$this->table = new LogTable($config);
	}
	
	public function log($message, $userid = null)
	{
		$this->table->add(array(
			'userid'	=> $userid,
			'message'	=> $message
		));
	}
}
